Integrand size = 25, antiderivative size = 127 \[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\frac {2 c \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{3/2} f}-\frac {(5 c-d) \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \tan (e+f x)}{2 f (a+a \sec (e+f x))^{3/2}} \]
2*c*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/a^(3/2)/f-1/4*(5*c-d )*arctan(1/2*a^(1/2)*tan(f*x+e)*2^(1/2)/(a+a*sec(f*x+e))^(1/2))/a^(3/2)/f* 2^(1/2)-1/2*(c-d)*tan(f*x+e)/f/(a+a*sec(f*x+e))^(3/2)
Time = 2.45 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.81 \[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\frac {\cos \left (\frac {1}{2} (e+f x)\right ) \sec (e+f x) \left (-\left ((5 c-d) \arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ) \cos \left (\frac {1}{2} (e+f x)\right ) \sqrt {\sec (e+f x)} \sqrt {\frac {1}{1+\sec (e+f x)}} \sqrt {1+\sec (e+f x)}\right )+\sqrt {2} \left (4 c \arctan \left (\frac {\tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {\frac {1}{1+\sec (e+f x)}}}\right ) \cos \left (\frac {1}{2} (e+f x)\right ) \sqrt {\sec (e+f x)} \sqrt {\frac {1}{1+\sec (e+f x)}} \sqrt {1+\sec (e+f x)}-(c-d) \sqrt {\frac {1}{1+\cos (e+f x)}} \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{f \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} (a (1+\sec (e+f x)))^{3/2}} \]
(Cos[(e + f*x)/2]*Sec[e + f*x]*(-((5*c - d)*ArcSin[Tan[(e + f*x)/2]]*Cos[( e + f*x)/2]*Sqrt[Sec[e + f*x]]*Sqrt[(1 + Sec[e + f*x])^(-1)]*Sqrt[1 + Sec[ e + f*x]]) + Sqrt[2]*(4*c*ArcTan[Tan[(e + f*x)/2]/Sqrt[(1 + Sec[e + f*x])^ (-1)]]*Cos[(e + f*x)/2]*Sqrt[Sec[e + f*x]]*Sqrt[(1 + Sec[e + f*x])^(-1)]*S qrt[1 + Sec[e + f*x]] - (c - d)*Sqrt[(1 + Cos[e + f*x])^(-1)]*Sin[(e + f*x )/2])))/(f*Sqrt[Sec[(e + f*x)/2]^2]*(a*(1 + Sec[e + f*x]))^(3/2))
Time = 0.64 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.05, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 4410, 27, 3042, 4408, 3042, 4261, 216, 4282, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {c+d \sec (e+f x)}{(a \sec (e+f x)+a)^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d \csc \left (e+f x+\frac {\pi }{2}\right )}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{3/2}}dx\) |
\(\Big \downarrow \) 4410 |
\(\displaystyle -\frac {\int -\frac {4 a c-a (c-d) \sec (e+f x)}{2 \sqrt {\sec (e+f x) a+a}}dx}{2 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {4 a c-a (c-d) \sec (e+f x)}{\sqrt {\sec (e+f x) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {4 a c-a (c-d) \csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 4408 |
\(\displaystyle \frac {4 c \int \sqrt {\sec (e+f x) a+a}dx-a (5 c-d) \int \frac {\sec (e+f x)}{\sqrt {\sec (e+f x) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {4 c \int \sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx-a (5 c-d) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 4261 |
\(\displaystyle \frac {-\frac {8 a c \int \frac {1}{\frac {a^2 \tan ^2(e+f x)}{\sec (e+f x) a+a}+a}d\left (-\frac {a \tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}-a (5 c-d) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {8 \sqrt {a} c \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-a (5 c-d) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}}dx}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 4282 |
\(\displaystyle \frac {\frac {2 a (5 c-d) \int \frac {1}{\frac {a^2 \tan ^2(e+f x)}{\sec (e+f x) a+a}+2 a}d\left (-\frac {a \tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}+\frac {8 \sqrt {a} c \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {8 \sqrt {a} c \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {\sqrt {2} \sqrt {a} (5 c-d) \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{f}}{4 a^2}-\frac {(c-d) \tan (e+f x)}{2 f (a \sec (e+f x)+a)^{3/2}}\) |
((8*Sqrt[a]*c*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/f - (Sqrt[2]*Sqrt[a]*(5*c - d)*ArcTan[(Sqrt[a]*Tan[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sec[e + f*x]])])/f)/(4*a^2) - ((c - d)*Tan[e + f*x])/(2*f*(a + a*Sec[e + f*x])^(3/2))
3.2.74.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*(b/d) Subst[Int[1/(a + x^2), x], x, b*(Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S ymbol] :> Simp[-2/f Subst[Int[1/(2*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[ a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_ .) + (a_)], x_Symbol] :> Simp[c/a Int[Sqrt[a + b*Csc[e + f*x]], x], x] - Simp[(b*c - a*d)/a Int[Csc[e + f*x]/Sqrt[a + b*Csc[e + f*x]], x], x] /; F reeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[(-(b*c - a*d))*Cot[e + f*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1))), x] + Simp[1/(a^2*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*Simp[a*c*(2*m + 1) - (b*c - a*d)*(m + 1)*Csc[e + f*x], x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && EqQ[a^2 - b^2, 0] && IntegerQ[2*m]
Leaf count of result is larger than twice the leaf count of optimal. \(288\) vs. \(2(106)=212\).
Time = 3.02 (sec) , antiderivative size = 289, normalized size of antiderivative = 2.28
method | result | size |
default | \(-\frac {\sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\, \sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-4 c \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right )-c \sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+d \sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+5 c \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right )-d \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right )\right )}{4 a^{2} f}\) | \(289\) |
parts | \(\frac {c \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\, \sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (4 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )-5 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right )\right )}{4 f \,a^{2}}+\frac {d \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\, \sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}\right )\right )}{4 f \,a^{2}}\) | \(349\) |
-1/4/a^2/f*(-2*a/((1-cos(f*x+e))^2*csc(f*x+e)^2-1))^(1/2)*((1-cos(f*x+e))^ 2*csc(f*x+e)^2-1)^(1/2)*(-4*c*2^(1/2)*arctanh(2^(1/2)/((1-cos(f*x+e))^2*cs c(f*x+e)^2-1)^(1/2)*(-cot(f*x+e)+csc(f*x+e)))-c*((1-cos(f*x+e))^2*csc(f*x+ e)^2-1)^(1/2)*(-cot(f*x+e)+csc(f*x+e))+d*((1-cos(f*x+e))^2*csc(f*x+e)^2-1) ^(1/2)*(-cot(f*x+e)+csc(f*x+e))+5*c*ln(csc(f*x+e)-cot(f*x+e)+((1-cos(f*x+e ))^2*csc(f*x+e)^2-1)^(1/2))-d*ln(csc(f*x+e)-cot(f*x+e)+((1-cos(f*x+e))^2*c sc(f*x+e)^2-1)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (106) = 212\).
Time = 1.88 (sec) , antiderivative size = 548, normalized size of antiderivative = 4.31 \[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\left [-\frac {4 \, {\left (c - d\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt {2} {\left ({\left (5 \, c - d\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (5 \, c - d\right )} \cos \left (f x + e\right ) + 5 \, c - d\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, a \cos \left (f x + e\right )^{2} + 2 \, a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) + 8 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right )}{8 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}}, -\frac {2 \, {\left (c - d\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - \sqrt {2} {\left ({\left (5 \, c - d\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (5 \, c - d\right )} \cos \left (f x + e\right ) + 5 \, c - d\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + 8 \, {\left (c \cos \left (f x + e\right )^{2} + 2 \, c \cos \left (f x + e\right ) + c\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right )}{4 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}}\right ] \]
[-1/8*(4*(c - d)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin( f*x + e) - sqrt(2)*((5*c - d)*cos(f*x + e)^2 + 2*(5*c - d)*cos(f*x + e) + 5*c - d)*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f* x + e))*cos(f*x + e)*sin(f*x + e) + 3*a*cos(f*x + e)^2 + 2*a*cos(f*x + e) - a)/(cos(f*x + e)^2 + 2*cos(f*x + e) + 1)) + 8*(c*cos(f*x + e)^2 + 2*c*co s(f*x + e) + c)*sqrt(-a)*log((2*a*cos(f*x + e)^2 + 2*sqrt(-a)*sqrt((a*cos( f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a )/(cos(f*x + e) + 1)))/(a^2*f*cos(f*x + e)^2 + 2*a^2*f*cos(f*x + e) + a^2* f), -1/4*(2*(c - d)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*s in(f*x + e) - sqrt(2)*((5*c - d)*cos(f*x + e)^2 + 2*(5*c - d)*cos(f*x + e) + 5*c - d)*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e)) *cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + 8*(c*cos(f*x + e)^2 + 2*c*cos(f*x + e) + c)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))))/(a^2*f*cos(f*x + e)^2 + 2*a^2*f*cos(f*x + e) + a^2*f)]
\[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\int \frac {c + d \sec {\left (e + f x \right )}}{\left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
\[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\int { \frac {d \sec \left (f x + e\right ) + c}{{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
Exception generated. \[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E rror: Bad Argument Value
Timed out. \[ \int \frac {c+d \sec (e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx=\int \frac {c+\frac {d}{\cos \left (e+f\,x\right )}}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}} \,d x \]